Or, you could use something like procmail in place of your local mail agent. It's flexible enough to deal with a heterogenous environment and claims to be more secure than regular local mail delivery. I think I believe it because of the way it makes sure that the path variable is explicitly set before execution of commands (and of course IFS).